<template>
	<view class="container">
		<u-grid :border="true" col="2" :customStyle="GridStyle">
			<u-grid-item v-for="(item,index) in list" :key="index" :customStyle="ItemStyle" @click="goPages(item.url)">
				<u-icon :customStyle="IconStyle" :name="item.name" :size="40"></u-icon>
				<text class="grid-text">{{item.title}}</text>
			</u-grid-item>
		</u-grid>
		<u-toast ref="uToast" />
	</view>



</template>

<script>
	export default {
		data() {
			return {
				list: [{
						name: 'more-circle-fill',
						title: '客户来源',
						url: '/pages/business/source/index'
					},
					{
						name: 'account-fill',
						title: '客户公海',
						url: '/pages/business/highsea/index'
					},
					{
						name: 'account',
						title: '客户私海',
						url: '/pages/business/privatesea/index'
					},
					{
						name: 'plus-people-fill',
						title: '领取记录',
						url: '/pages/business/receive/index'
					},
					{
						name: 'server-fill',
						title: '回访记录',
						url: '/pages/business/visit/index'
					},
					{
						name: 'trash-fill',
						title: '客户回收站',
						url: '/pages/business/budrecycle/index'
					},
					{
						name: 'order',
						title: '课程订单',
						url: '/pages/business/order/index'
					},
				],
				GridStyle: {
					borderBottom: '1px solid #dadbde',
				},
				ItemStyle: {
					padding: '2em 0em',
					// border:'1px solid #dadbde',
				},
				IconStyle: {
					marginBottom: '.5em',
					color: "#19BC9C"
				},
				LoginUser: {},
			}
		},
		onShow() {
			this.LoginUser = uni.getStorageSync('LoginUser') ? uni.getStorageSync('LoginUser') : {};
		},
		methods: {
			goPages(url) {
				let check = this.$u.auth.check()
				check.then((res) => {
					if (res) {
						uni.navigateTo({
							url: url
						})
					}
				})
			}
		}
	}
</script>

<style>
	.container {
		padding: 0px 10px;
	}
</style>